<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <body>

        <ui:composition template="../templates/default3.xhtml">  

            <ui:define name="content">
                <h:form binding="#{logManagerBean.loadLogList}">
                    <p:panel header="View Logs" id="logPanel">
                        <p:dataTable id="logs" var="logs" value="#{logManagerBean.logs}" paginator="false" 
                                     emptyMessage="No logs found with given criteria.">
                             <p:column filterBy="#{logs.logDate}" headerText="Action date"  filterMatchMode="contains"> 
                                <h:outputText value="#{logs.logDate}">  
                                    <f:convertDateTime pattern="dd-MMM-yyyy hh:mm a" timeZone="#{defaultManagerBean.tz}"/>
                                </h:outputText>
                            </p:column>                     
                            <p:column filterBy="#{logs.employee.userId}" headerText="Action Done By" filterMatchMode="contains">  
                                <h:outputText value="#{logs.employee.userId}" />  
                            </p:column>
                            <p:column filterBy="#{logs.type}"   
                                      headerText="Action type"
                                      filterOptions="#{logManagerBean.logTypeOptions}"  
                                      filterMatchMode="exact">  
                                <h:outputText value="#{logs.type}" />  
                            </p:column>  
                            <p:column headerText="Action Description" >  
                                <h:outputText value="#{logs.description}" />  
                            </p:column>
                            <p:column headerText="Action page" >  
                                <h:outputText value="#{logs.page}" />  
                            </p:column>
                            
                              
                           
                        </p:dataTable>
                    </p:panel>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
